package com.woniuxy.moneyapp.client;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.commons.util.Result;
import com.woniuxy.moneyapp.client.param.*;
import io.seata.spring.annotation.GlobalTransactional;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;


@FeignClient(name = "fund",path = "/fundPath",contextId = "PayRecordClient")
@Component
//第一个是context path 第二个是
public interface PayRecordClient {

    //余额支付
    @ApiOperation("余额支付")
    @PostMapping("/payRecord/balancePay")
    Result balancePay(@RequestBody @Valid BalancePayForm bp);

    @ApiOperation("新增支付表记录")
    @PostMapping("/payRecord/addPayRecord")
    Result addPayRecord(@RequestBody @Valid PayRecordInfo payRecord);

    @ApiOperation("查询支付表")
    @PostMapping("/payRecord/payRecord")
    Result<Page<PayRecordToShow>> payRecord(@RequestBody @Valid PayRecordForm payRecordForm);

    @ApiOperation("查询我的钱包")
    @PostMapping("/payRecord/myWallet")
    Result<Page<MyWalletToShow>> myWallet(@RequestBody @Valid MyWalletForm myWalletForm);


}
